package com.example.boke.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import cn.hutool.core.annotation.Alias;


@Data
@TableName("user")
public class User{
private static final long serialVersionUID = -65345367454981152L;
 
    @TableId(value ="id",type= IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    @Alias("")
    private Integer id;
        /**
     * 用户名
     */
    @TableField(value = "username")
    @Alias("用户名")
    private String username;
        /**
     * 密码
     */
    @TableField(value = "password")
    @Alias("密码")
    private String password;
        /**
     * 姓名
     */
    @TableField(value = "name")
    @Alias("姓名")
    private String name;
        /**
     * 电话
     */
    @TableField(value = "phone")
    @Alias("电话")
    private String phone;
        /**
     * 邮箱
     */
    @TableField(value = "email")
    @Alias("邮箱")
    private String email;
        /**
     * 地址
     */
    @TableField(value = "address")
    @Alias("地址")
    private String address;
        /**
     * 头像
     */
    @TableField(value = "avatar")
    @Alias("头像")
    private String avatar;
        /**
     * 角色
     */
    @TableField(value = "role")
    @Alias("角色")
    private String role;


    @TableField(exist = false)
    private String token;

}
